<% layout('/layouts/default.html', {title: '考核任务信息表管理', libs: ['dataGrid']}){ %>
<style>
	.menu {
		padding: 2px;
		cursor: pointer;
		margin: 2px 1px 2px;
	}

	.options {
		position: absolute;
		display: none;
		width: 100px;
		/* height: 100px; */
		background: #eee;
		margin-left: 5%;
		/*overflow: auto;*/
	}

	.menu:hover .options {
		display: block;
	}
</style>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<#form:form id="searchForm" model="${dcSupExamInfo}" action="${ctx}/targetAudit/listData" method="post" class="form-inline "
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			<div class="pull-right">
<!--				<div class="form-group">-->
<!--					<label class="control-label">${text('年度')}：</label>-->
<!--					<div class="control-inline width-120">-->
<!--						<#form:select path="examYear" items="${yearList}" blankOption="true" data-placeholder="请选择" itemLabel="yearLabel" itemValue="yearValue" class="form-control width-120" defaultValue="${currentYear}"/>-->
<!--					</div>-->
<!--				</div>-->
				<!--<div class="form-group">
					<label class="control-label">${text('报送状态')}：</label>
					<div class="control-inline width-200">
						<% var items = [{label:'未报送',value:'0'},{label:'已报送',value:'1'},{label:'已发布',value:'2'},{label:'已退回',value:'3'}]; %>
						<#form:select path="examStatus" items="${items}" blankOption="true" data-placeholder="请选择报送状态" itemLabel="label" itemValue="value" class="form-control width-260" />
					</div>
				</div>-->
				<div class="form-group">
					<label class="control-label">${text('考核标题')}：</label>
					<div class="control-inline width-160">
						<#form:input path="examTitle" maxlength="100" class="form-control width-160" placeholder="请输入考核标题"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button onclick="cz();" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</div>
			</#form:form>
	    </div>
	    <div class="box-body">

			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("主键")}', name:'id', hidden:true},
		{header:'${text("考核标题")}', name:'examTitle', index:'a.exam_title', width:130, align:"left",
			formatter: function(val, obj, row, act){
				return '<a href="${ctx}/exam/dcSupExamInfo/form?id='+row.id+'" class="btnList" data-title="${text("查看考核任务信息")}">'+(val||row.id)+'</a>';
			}},
		{header:'${text("考核年份")}', name:'examYear', index:'a.exam_year', width:100, align:"center"},
		{header:'${text("发布时间")}', name:'createDate', index:'a.create_date', width:100, align:"center"},
		/*{header:'${text("发布状态")}', name:'examStatus', index:'a.exam_status', width:100, align:"center"
			, formatter: function(val, obj, row, act){
				return js.getDictLabel(${@DictUtils.getDictListJson('dc_exam_status')}, val, '${text("未知")}', true);
			}},*/
		{header:'操作', name:'testSelect', width:80, align:"center",title:false,
			formatter: function(val, obj, row, act){
				return '    <div class="menu" style="position: relative;">\n' +
						'       <div id="u62_text" class="text ">\n' +
						'                <p style="font-size: 14px;" id="cache4"><span class="btn-primary btn-xs">更多操作</span></p>\n' +
						'              </div>' +
						'        <div class="options" >\n' +
						'            <div ><a href="${ctx}/targetAudit/targetSendAuditPage?quotaGroup=1&examId='+row.id+'" class="btnList"  title="${text("关键指标审核")}">关键指标审核</a></div>\n' +
						'            <div ><a href="${ctx}/targetAudit/targetSendDXAuditPage?quotaGroup=2&examId='+row.id+'" class="btnList"  title="${text("单项指标审核")}">单项指标审核</a></div>\n' +
						'            <div ><a href="${ctx}/targetAudit/targetAuditPage?examId='+row.id+'&examTitle='+row.examTitle+'" class="btnList" title="${text("细则审核")}">细则审核</a></div>\n' +
						'\n' +
						'        </div>\n' +
						'\n' +
						'    </div>';

			}

		}
	],

	// 加载成功后执行事件
	ajaxSuccess: function(data){

	}
});
function moveTitle() {
	$(".menu").attr("title",'');
}

//重置按钮
function cz() {
	searchForm.reset();
	$('dataGrid').dataGrid('reloadGrid');
}

//打开新的标签
function addKpi() {
	js.addTabPage(null, "新增目标考核","${ctx}/exam/dcSupExamInfo/form", true);
}

</script>
<style>
#dataGrid tr td:last-child{
	position: relative;
	overflow: inherit !important;

}
	.ui-jqgrid .ui-jqgrid-btable{
		margin-bottom: 120px;
	}
	.pp{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.dd{
		padding: 4% 15%;
		border: 1px solid #0079fe;
		color: #0079fe;
	}
	.options{
		width: 138px;
/*display: block;*/
/*		height: 170px;*/
		background-color: white;
		box-shadow: 1px 14px 20px 2px #e8e8e8;
		padding: 5px 0px;
/*top: 8.3%;*/
		right: 0px;
		left:0px;
         margin:auto;
		z-index: 99999
	}
	.options div{
		text-align: center;
	padding: 0px;
	line-height: 25px;

	}
	.options div:hover{
		background-color: rgba(24, 144, 255,1);

	}

	.options div:hover a{
		color: #eeeeee;

	}
	.menu:hover .options{
		/* animation: anim .4s ; */
	}

	@keyframes anim {
		0%{
			height: 0px;
		}
		100%{
			height: 120px;
		}
	}


</style>
